// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'


// 按需导入组件
import { Swipe, SwipeItem } from 'mint-ui'
// 导入组件的样式
import 'mint-ui/lib/style.css'


import './assets/mui/css/mui.min.css'
import './assets/mui/fonts/mui.ttf'   

import './assets/mui/css/icons-extra.css'
// import './assets/mui/js/mui.min.js'




// 全局注册组件
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem)

// 导入vue-axios

import VueAxios from 'vue-axios'

import axios from 'axios'
// 注册 vue-axios

Vue.use(VueAxios,axios)

// 配置全局的url

axios.defaults.baseURL = 'http://localhost/succulent/public/index.php/api/';

// 导入时间插件
import moment from 'moment'
// 定义全局过滤器

Vue.filter('dateFormat',(dateStr,patter = 'Y-M-D')=>{
  return moment(dateStr).format(patter);
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
